﻿<Window x:Class="XamlHelpmeet.UI.SelectClass.SelectClassFromAssembliesWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Select Source Class"
        Width="589"
        Height="486"
        WindowStyle="ToolWindow">
	<Grid>
		<Grid.Resources>

			<DataTemplate x:Key="classTemplate">
				<TextBlock Text="{Binding Path=TypeName}" />
			</DataTemplate>

			<HierarchicalDataTemplate x:Key="namespaceTemplate"
			                          ItemTemplate="{StaticResource classTemplate}"
			                          ItemsSource="{Binding Path=Items}">
				<StackPanel Orientation="Horizontal">
					<TextBlock FontWeight="Bold" Text=" {} " />
					<TextBlock FontWeight="Bold" Text="{Binding Path=Name}" />
				</StackPanel>

			</HierarchicalDataTemplate>

			<HierarchicalDataTemplate x:Key="assemblyTemplate"
			                          ItemTemplate="{StaticResource namespaceTemplate}"
			                          ItemsSource="{Binding Path=Items}">
				<StackPanel Orientation="Horizontal">
					<Image />
					<TextBlock VerticalAlignment="Center"
					           FontWeight="Bold"
					           Text="{Binding Path=Name}" />
				</StackPanel>
			</HierarchicalDataTemplate>

		</Grid.Resources>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>

		<StackPanel Orientation="Horizontal">
			<Image Source="/XamlHelpmeet.UI;component/Resources/Class58X58.png" Margin="6,0" />
			<StackPanel VerticalAlignment="Center">
				<TextBlock FontSize="18" Text="Select Source Class" />
				<TextBlock x:Name="tbCommandCaption"
				           Margin="7"
				           FontSize="14" />
			</StackPanel>
		</StackPanel>

		<TextBlock Grid.Row="1"
		           Margin="10"
		           FontSize="12"
		           Text="Select source class from the below list of assemblies.  If your desired class does not appear, please rebuild your project.  Abstract classes and Microsoft assemblies are not listed."
		           TextWrapping="Wrap" />

		<TreeView x:Name="tvObjects"
		          Grid.Row="2"
				  SelectedItemChanged="tvObjects_SelectedItemChanged"
		          ItemTemplate="{StaticResource assemblyTemplate}" />

		<Grid Grid.Row="3"
		      Margin="11"
		      Grid.IsSharedSizeScope="True">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="Auto" SharedSizeGroup="buttons" />
				<ColumnDefinition Width="Auto" SharedSizeGroup="buttons" />
			</Grid.ColumnDefinitions>
			<Button x:Name="btnNext"
			        Grid.Column="1"
			        Margin="3.5"
			        HorizontalAlignment="Left"
			        VerticalAlignment="Center"
			        Click="btnNext_Click"
			        Content="Next..."
			        IsEnabled="False"
			        Padding="3.5" />
			<Button x:Name="btnCancel"
			        Grid.Column="2"
			        Margin="3.5"
			        HorizontalAlignment="Left"
			        VerticalAlignment="Center"
			        Click="btnCancel_Click"
			        Content="Cancel"
			        Padding="3.5" />
		</Grid>
	</Grid>
</Window>
